package com.ruoyi.vote.domain;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 投票信息对象 vote
 *
 * @author wxx
 * @date 2022-10-05
 */
public class Vote extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 投票
     */
    private Long id;

    /**
     * 投票类型
     */
    @Excel(name = "投票类型")
    private Long multiple;

    /**
     * 投票标题
     */
    @Excel(name = "投票标题")
    private String title;

    /**
     * 投票补充
     */
    @Excel(name = "投票补充")
    private String desc;

    /**
     * 创建日期
     */

    private Date createDate;

    /**
     * 结束日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8", shape = JsonFormat.Shape.STRING)
    private Date endDate;

    /**
     * 用户名
     */
    @Excel(name = "用户名")
    private String username;

    /**
     * 是否过期
     */
    private Long isExpired;

    /**
     * 是否匿名
     */
    @Excel(name = "是否匿名")
    private Long isAnoymous;

    // 该投票对应的选项
    private List<Options> ops;

    // 该投票对应的结果
    private List<Result> results;

    public List<Result> getResults() {
        return results;
    }

    public void setResults(List<Result> results) {
        this.results = results;
    }

    public List<Options> getOps() {
        return ops;
    }

    public void setOps(List<Options> ops) {
        this.ops = ops;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setMultiple(Long multiple) {
        this.multiple = multiple;
    }

    public Long getMultiple() {
        return multiple;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUsername() {
        return username;
    }

    public void setIsExpired(Long isExpired) {
        this.isExpired = isExpired;
    }

    public Long getIsExpired() {
        return isExpired;
    }

    public void setIsAnoymous(Long isAnoymous) {
        this.isAnoymous = isAnoymous;
    }

    public Long getIsAnoymous() {
        return isAnoymous;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("multiple", getMultiple())
                .append("title", getTitle())
                .append("desc", getDesc())
                .append("createDate", getCreateDate())
                .append("endDate", getEndDate())
                .append("username", getUsername())
                .append("isExpired", getIsExpired())
                .append("isAnoymous", getIsAnoymous())
                .toString();
    }
}
